﻿@using VirtualPress.Infrastructure.Entities.Entity;
@{
    ViewBag.Title = "出版申请";
}
@section head{
    <link rel="stylesheet" href="/content/css/uniform.css" />
}
<div id="content-header">
    <h1>
        出版申请</h1>
</div>
<div id="breadcrumb">
    <a href="/WorkSpace/press/index" class="tip-bottom"><i class="icon-home"></i>起始页</a> <a class="current">
        出版申请</a>
</div>
<div class="container-fluid">
    <div class="row-fluid">
        <div class="span12">
            <div class="widget-box">
                <div class="widget-title">
                    <span class="icon"><i class="icon-inbox"></i></span>
                    <h5>
                        出版申请</h5>
                </div>
                <div class="widget-content nopadding">
                    <table class="table table-bordered">
                        <thead>
                            <tr>
                                <th style="width: 25%">
                                    书名
                                </th>
                                <th style="width: 10%;">
                                    作者
                                </th>
                                <th>
                                    简介
                                </th>
                                <th style="width: 15%">
                                </th>
                            </tr>
                        </thead>
                        <tbody>
                            @{
                                ItemListBox<PublishApply> data = ViewBag.Data;
                                if (data != null && data.Data != null)
                                {
                                    foreach (var item in data.Data)
                                    {
                                <tr>
                                    <td>
                                        <a href="/workspace/press/PublishApplyEdit/@item.Id" target="_blank">@item.Name</a>
                                    </td>
                                    <td>
                                        @item.Authors
                                    </td>
                                    <td>
                                        @item.Introduction
                                    </td>
                                    <td class="center">
                                        <a href="/workspace/press/PublishApplyEdit/@item.Id" target="_blank" class="btn btn-primary btn-mini">编辑</a> 
                                        <a href="javascript:;" class="btn btn-danger btn-mini" onclick="deletethis(@item.Id)">删除</a>
                                    </td>
                                </tr>
                                    }
                                }
                            }
                        </tbody>
                    </table>
                </div>              
                @Html.Raw(data.PageItemSegment)
            </div>
        </div>
    </div>
</div>
@section tail{
    <script type="text/javascript" src="/scripts/jquery.uniform.js"></script>
    <script type="text/javascript" src="/scripts/select2.min.js"></script>
    <script type="text/javascript" src="/scripts/jquery.dataTables.min.js"></script>
    <script type="text/javascript" src="/scripts/unicorn.tables.js"></script>
    <script type="text/javascript">
        $(function () {
            $('#likbook').addClass('open active');
        });
        function deletenewsitem(id) {
            if (confirm('确认删除该条数据吗？')) {
                window.location.href = "/WorkSpace/Press/NewsCancel/" + id;
            }
        }
        function deletethis(id) {
            if (id) {
                if (confirm('您确认要删除此申请记录吗？')) {
                    window.location.href = "/workspace/press/deleltepublishapply/" + id;
                }
            }
        }
    </script>
}
